package lambda;
import lambda.interF.MyConsumer;
import lambda.model.Student;
import java.util.function.Consumer;
public class demo6 {
    public static void main(String[] args) {
        //无参静态方法引用
        MyConsumer myConsumer= Student::noArgsStatic;
        myConsumer.doMeth();
        //等价lambda
        MyConsumer myConsumer1=()->Student.noArgsStatic();
        myConsumer1.doMeth();

        //有参静态方法引用
        Consumer<Integer> consumer=Student::hasArgsStatic;
        consumer.accept(666);
        //等价lambda
        Student student=new Student("阿伟");
        Consumer<Integer> consumer1=(o)->Student.hasArgsStatic(o);
        consumer1.accept(777);
    }

}
